package com.micai.springboot.repository;

import com.micai.springboot.entity.BookEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * 描述：
 * <p>
 * Author: 赵新国
 * Date: 2018/1/23 16:35
 */
public interface BookRepository extends ElasticsearchRepository<BookEntity, String> {

    Page<BookEntity> findByAuthor(String author, Pageable pageable);

    List<BookEntity> findByTitle(String title);
}
